package com.wecon.dianping.controller.canal;

import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.apache.rocketmq.common.message.Message;

public class CanalMQ {
    public static void main(String[] args) throws Exception {
        DefaultMQProducer producer = new DefaultMQProducer("s2");
//        producer.setNamesrvAddr("{192.168.1.103}:10911");
//        producer.setNamesrvAddr("{192.168.1.103}:9876");
//        producer.setNamesrvAddr("192.168.1.103:9876;192.168.1.104:9876");
        producer.setNamesrvAddr("192.168.1.103:10912");
//        producer.setNamesrvAddr("192.168.1.103:10911;192.168.1.104:10911");
        producer.start();
        Message msg = new Message();
        msg.setTopic("DDYF_REPORT");
        msg.setTags("deep");
        msg.setBody("开始继续拉电话费".getBytes());
        producer.send(msg);
    }
}